From: Pascal Nowack Date: Thu, 11 Feb 2021 14:17:22 +0000 (+0100) Subject: ui/windowManager: Fix horizontal scrolling when smooth events are used X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~419 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d02612e790ef630864b621bb329db17de5419614;p=gnome-shell.git ui/windowManager: Fix horizontal scrolling when smooth events are used Currently, gnome-shell uses the wrong scrolling direction for horizontal scrolling events. When dx < 0 for a smooth scroll event, then the scrolling direction is supposed to be Clutter.ScrollDirection.LEFT, instead of Clutter.ScrollDirection.RIGHT, as dx is smaller than 0. Fix this issue by swapping the values LEFT and RIGHT. Part-of: --- diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index f113fed38..bbe9b5d71 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -1873,8 +1873,8 @@ var WindowManager = class { const [dx, dy] = event.get_scroll_delta(); if (Math.abs(dx) > Math.abs(dy)) { direction = dx < 0 - ? Clutter.ScrollDirection.RIGHT - : Clutter.ScrollDirection.LEFT; + ? Clutter.ScrollDirection.LEFT + : Clutter.ScrollDirection.RIGHT; } else if (Math.abs(dy) > Math.abs(dx)) { direction = dy < 0 ? Clutter.ScrollDirection.UP